package com.zhijiang.hospital.controller;

import com.zhijiang.hospital.service.InformationService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * fan
 */
@Api(value = "权限信息", tags = {"权限信息数据"})
@RestController
@RequestMapping("personnelInformation")
public class InformationController {

    @Autowired
    InformationService informationService;

    /**
     * 所有科室信息展示
     * @return
     */
    //@GetMapping("all")
    //public ResponseResult getAllDepartment(){
    //    List<ComDepartment> comDepartments = informationService.getDepartmentAll();
    //    return new ResponseResult(200,comDepartments);
    //}
    //
    ///**
    // * 展示所有人员信息
    // * @return
    // */
    //@GetMapping("allEmployee")
    //public ResponseResult getAll(){
    //    List<ComEmployee> employees = informationService.getAllEmployee();
    //    return new ResponseResult(200,employees);
    //}
    //
    ///**
    // * 各个科室人员信息
    // * 院长可以查看所有科室下人员信息
    // * 主任可以查看本科室下人员信息
    // *
    // */
    //@GetMapping("departmentInEmployeeAll")
    //public ResponseResult getComEmployee(String deptCode){
    //     List<ComEmployee> employees = informationService.getEmployee(deptCode);
    //    return new ResponseResult(200,employees);
    //}
    //
    ///**
    // * 获取下级及其下级部门
    // * 上级可以获取下级的科室信息
    // * @return
    // */
    //
    //@GetMapping("downDepartment")
    //public ResponseResult downDepartment(){
    //    //查询本人及其下属的部门信息
    //    //1.0  获取本人管理科室
    //    List<ComDepartment> comDepartments  = informationService.getDepartment();
    //    //2.0  便利科室下所有人员
    //    List<ComEmployee>  comEmployees  = informationService.getDepartmentDown(comDepartments);
    //    //遍历科室下所有部门
    //     List<ComDepartment> comDepartmentList =  informationService.getDepartmentToEmployees(comEmployees);
    //
    //     return new ResponseResult(200,comDepartmentList);
    //}
    ///**
    // * 获取本人信息
    // * @return
    // */
    ////@GetMapping("employee")
    ////public ResponseResult getemployee(){
    ////    ComEmployee comEmployee = UserHolder.localUser().getComEmployee();
    ////    if (comEmployee.getSexCode().equals("M")){
    ////        comEmployee.setSexCode("男");
    ////    }else if (comEmployee.getSexCode().equals("F")){
    ////        comEmployee.setSexCode("女");
    ////    }
    ////
    ////    return new ResponseResult(200,comEmployee);
    ////}
    //
    ///**
    // * 查询本人科室
    // * @return
    // */
    //@GetMapping("oneDartment")
    //public ResponseResult selectOneDepartment(){
    //
    //    List<ComDepartment> comDepartments  = informationService.getDepartment();
    //
    //    return new ResponseResult(200,comDepartments);
    //}
    //
    ///**
    // * 部门汇总   人员汇总
    // */
    //@GetMapping("sum")
    //public ResponseResult employeeAndDepartmentSum(){
    //    List<ComDepartment> comDepartments = informationService.getDepartmentAll();
    //    List<ComEmployee> employees = informationService.getAllEmployee();
    //    SummaryDto summaryDto = new SummaryDto();
    //    summaryDto.setComDepartmentSum(comDepartments.size());
    //    summaryDto.setComEmployeeSum(employees.size());
    //    return new ResponseResult(200,summaryDto);
    //}
}
